Integrand size = 19, antiderivative size = 130 \[ \int (a+b x)^n (c+d x)^{-4-n} \, dx=\frac {(a+b x)^{1+n} (c+d x)^{-3-n}}{(b c-a d) (3+n)}+\frac {2 b (a+b x)^{1+n} (c+d x)^{-2-n}}{(b c-a d)^2 (2+n) (3+n)}+\frac {2 b^2 (a+b x)^{1+n} (c+d x)^{-1-n}}{(b c-a d)^3 (1+n) (2+n) (3+n)} \]
(b*x+a)^(1+n)*(d*x+c)^(-3-n)/(-a*d+b*c)/(3+n)+2*b*(b*x+a)^(1+n)*(d*x+c)^(- 2-n)/(-a*d+b*c)^2/(2+n)/(3+n)+2*b^2*(b*x+a)^(1+n)*(d*x+c)^(-1-n)/(-a*d+b*c )^3/(1+n)/(2+n)/(3+n)
Time = 0.07 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.86 \[ \int (a+b x)^n (c+d x)^{-4-n} \, dx=\frac {(a+b x)^{1+n} (c+d x)^{-3-n} \left (a^2 d^2 \left (2+3 n+n^2\right )-2 a b d (1+n) (c (3+n)+d x)+b^2 \left (c^2 \left (6+5 n+n^2\right )+2 c d (3+n) x+2 d^2 x^2\right )\right )}{(b c-a d)^3 (1+n) (2+n) (3+n)} \]
((a + b*x)^(1 + n)*(c + d*x)^(-3 - n)*(a^2*d^2*(2 + 3*n + n^2) - 2*a*b*d*( 1 + n)*(c*(3 + n) + d*x) + b^2*(c^2*(6 + 5*n + n^2) + 2*c*d*(3 + n)*x + 2* d^2*x^2)))/((b*c - a*d)^3*(1 + n)*(2 + n)*(3 + n))
Time = 0.22 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.03, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {55, 55, 48}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b x)^n (c+d x)^{-n-4} \, dx\) |
\(\Big \downarrow \) 55 |
\(\displaystyle \frac {2 b \int (a+b x)^n (c+d x)^{-n-3}dx}{(n+3) (b c-a d)}+\frac {(a+b x)^{n+1} (c+d x)^{-n-3}}{(n+3) (b c-a d)}\) |
\(\Big \downarrow \) 55 |
\(\displaystyle \frac {2 b \left (\frac {b \int (a+b x)^n (c+d x)^{-n-2}dx}{(n+2) (b c-a d)}+\frac {(a+b x)^{n+1} (c+d x)^{-n-2}}{(n+2) (b c-a d)}\right )}{(n+3) (b c-a d)}+\frac {(a+b x)^{n+1} (c+d x)^{-n-3}}{(n+3) (b c-a d)}\) |
\(\Big \downarrow \) 48 |
\(\displaystyle \frac {(a+b x)^{n+1} (c+d x)^{-n-3}}{(n+3) (b c-a d)}+\frac {2 b \left (\frac {(a+b x)^{n+1} (c+d x)^{-n-2}}{(n+2) (b c-a d)}+\frac {b (a+b x)^{n+1} (c+d x)^{-n-1}}{(n+1) (n+2) (b c-a d)^2}\right )}{(n+3) (b c-a d)}\) |
((a + b*x)^(1 + n)*(c + d*x)^(-3 - n))/((b*c - a*d)*(3 + n)) + (2*b*(((a + b*x)^(1 + n)*(c + d*x)^(-2 - n))/((b*c - a*d)*(2 + n)) + (b*(a + b*x)^(1 + n)*(c + d*x)^(-1 - n))/((b*c - a*d)^2*(1 + n)*(2 + n))))/((b*c - a*d)*(3 + n))
3.19.76.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp [(a + b*x)^(m + 1)*((c + d*x)^(n + 1)/((b*c - a*d)*(m + 1))), x] /; FreeQ[{ a, b, c, d, m, n}, x] && EqQ[m + n + 2, 0] && NeQ[m, -1]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[ (a + b*x)^(m + 1)*((c + d*x)^(n + 1)/((b*c - a*d)*(m + 1))), x] - Simp[d*(S implify[m + n + 2]/((b*c - a*d)*(m + 1))) Int[(a + b*x)^Simplify[m + 1]*( c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && ILtQ[Simplify[m + n + 2], 0] && NeQ[m, -1] && !(LtQ[m, -1] && LtQ[n, -1] && (EqQ[a, 0] || (NeQ[ c, 0] && LtQ[m - n, 0] && IntegerQ[n]))) && (SumSimplerQ[m, 1] || !SumSimp lerQ[n, 1])
Leaf count of result is larger than twice the leaf count of optimal. \(318\) vs. \(2(130)=260\).
Time = 0.59 (sec) , antiderivative size = 319, normalized size of antiderivative = 2.45
method | result | size |
gosper | \(-\frac {\left (b x +a \right )^{1+n} \left (d x +c \right )^{-3-n} \left (a^{2} d^{2} n^{2}-2 a b c d \,n^{2}-2 a b \,d^{2} n x +b^{2} c^{2} n^{2}+2 b^{2} c d n x +2 d^{2} x^{2} b^{2}+3 a^{2} d^{2} n -8 a b c d n -2 x a b \,d^{2}+5 b^{2} c^{2} n +6 x \,b^{2} c d +2 a^{2} d^{2}-6 a b c d +6 b^{2} c^{2}\right )}{a^{3} d^{3} n^{3}-3 a^{2} b c \,d^{2} n^{3}+3 a \,b^{2} c^{2} d \,n^{3}-b^{3} c^{3} n^{3}+6 a^{3} d^{3} n^{2}-18 a^{2} b c \,d^{2} n^{2}+18 a \,b^{2} c^{2} d \,n^{2}-6 b^{3} c^{3} n^{2}+11 a^{3} d^{3} n -33 a^{2} b c \,d^{2} n +33 a \,b^{2} c^{2} d n -11 b^{3} c^{3} n +6 a^{3} d^{3}-18 a^{2} b c \,d^{2}+18 a \,b^{2} c^{2} d -6 b^{3} c^{3}}\) | \(319\) |
-(b*x+a)^(1+n)*(d*x+c)^(-3-n)*(a^2*d^2*n^2-2*a*b*c*d*n^2-2*a*b*d^2*n*x+b^2 *c^2*n^2+2*b^2*c*d*n*x+2*b^2*d^2*x^2+3*a^2*d^2*n-8*a*b*c*d*n-2*a*b*d^2*x+5 *b^2*c^2*n+6*b^2*c*d*x+2*a^2*d^2-6*a*b*c*d+6*b^2*c^2)/(a^3*d^3*n^3-3*a^2*b *c*d^2*n^3+3*a*b^2*c^2*d*n^3-b^3*c^3*n^3+6*a^3*d^3*n^2-18*a^2*b*c*d^2*n^2+ 18*a*b^2*c^2*d*n^2-6*b^3*c^3*n^2+11*a^3*d^3*n-33*a^2*b*c*d^2*n+33*a*b^2*c^ 2*d*n-11*b^3*c^3*n+6*a^3*d^3-18*a^2*b*c*d^2+18*a*b^2*c^2*d-6*b^3*c^3)
Leaf count of result is larger than twice the leaf count of optimal. 507 vs. \(2 (130) = 260\).
Time = 0.25 (sec) , antiderivative size = 507, normalized size of antiderivative = 3.90 \[ \int (a+b x)^n (c+d x)^{-4-n} \, dx=\frac {{\left (2 \, b^{3} d^{3} x^{4} + 6 \, a b^{2} c^{3} - 6 \, a^{2} b c^{2} d + 2 \, a^{3} c d^{2} + 2 \, {\left (4 \, b^{3} c d^{2} + {\left (b^{3} c d^{2} - a b^{2} d^{3}\right )} n\right )} x^{3} + {\left (a b^{2} c^{3} - 2 \, a^{2} b c^{2} d + a^{3} c d^{2}\right )} n^{2} + {\left (12 \, b^{3} c^{2} d + {\left (b^{3} c^{2} d - 2 \, a b^{2} c d^{2} + a^{2} b d^{3}\right )} n^{2} + {\left (7 \, b^{3} c^{2} d - 8 \, a b^{2} c d^{2} + a^{2} b d^{3}\right )} n\right )} x^{2} + {\left (5 \, a b^{2} c^{3} - 8 \, a^{2} b c^{2} d + 3 \, a^{3} c d^{2}\right )} n + {\left (6 \, b^{3} c^{3} + 6 \, a b^{2} c^{2} d - 6 \, a^{2} b c d^{2} + 2 \, a^{3} d^{3} + {\left (b^{3} c^{3} - a b^{2} c^{2} d - a^{2} b c d^{2} + a^{3} d^{3}\right )} n^{2} + {\left (5 \, b^{3} c^{3} - a b^{2} c^{2} d - 7 \, a^{2} b c d^{2} + 3 \, a^{3} d^{3}\right )} n\right )} x\right )} {\left (b x + a\right )}^{n} {\left (d x + c\right )}^{-n - 4}}{6 \, b^{3} c^{3} - 18 \, a b^{2} c^{2} d + 18 \, a^{2} b c d^{2} - 6 \, a^{3} d^{3} + {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} n^{3} + 6 \, {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} n^{2} + 11 \, {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} n} \]
(2*b^3*d^3*x^4 + 6*a*b^2*c^3 - 6*a^2*b*c^2*d + 2*a^3*c*d^2 + 2*(4*b^3*c*d^ 2 + (b^3*c*d^2 - a*b^2*d^3)*n)*x^3 + (a*b^2*c^3 - 2*a^2*b*c^2*d + a^3*c*d^ 2)*n^2 + (12*b^3*c^2*d + (b^3*c^2*d - 2*a*b^2*c*d^2 + a^2*b*d^3)*n^2 + (7* b^3*c^2*d - 8*a*b^2*c*d^2 + a^2*b*d^3)*n)*x^2 + (5*a*b^2*c^3 - 8*a^2*b*c^2 *d + 3*a^3*c*d^2)*n + (6*b^3*c^3 + 6*a*b^2*c^2*d - 6*a^2*b*c*d^2 + 2*a^3*d ^3 + (b^3*c^3 - a*b^2*c^2*d - a^2*b*c*d^2 + a^3*d^3)*n^2 + (5*b^3*c^3 - a* b^2*c^2*d - 7*a^2*b*c*d^2 + 3*a^3*d^3)*n)*x)*(b*x + a)^n*(d*x + c)^(-n - 4 )/(6*b^3*c^3 - 18*a*b^2*c^2*d + 18*a^2*b*c*d^2 - 6*a^3*d^3 + (b^3*c^3 - 3* a*b^2*c^2*d + 3*a^2*b*c*d^2 - a^3*d^3)*n^3 + 6*(b^3*c^3 - 3*a*b^2*c^2*d + 3*a^2*b*c*d^2 - a^3*d^3)*n^2 + 11*(b^3*c^3 - 3*a*b^2*c^2*d + 3*a^2*b*c*d^2 - a^3*d^3)*n)
Exception generated. \[ \int (a+b x)^n (c+d x)^{-4-n} \, dx=\text {Exception raised: HeuristicGCDFailed} \]
\[ \int (a+b x)^n (c+d x)^{-4-n} \, dx=\int { {\left (b x + a\right )}^{n} {\left (d x + c\right )}^{-n - 4} \,d x } \]
\[ \int (a+b x)^n (c+d x)^{-4-n} \, dx=\int { {\left (b x + a\right )}^{n} {\left (d x + c\right )}^{-n - 4} \,d x } \]
Time = 0.98 (sec) , antiderivative size = 528, normalized size of antiderivative = 4.06 \[ \int (a+b x)^n (c+d x)^{-4-n} \, dx=-\frac {x\,{\left (a+b\,x\right )}^n\,\left (a^3\,d^3\,n^2+3\,a^3\,d^3\,n+2\,a^3\,d^3-a^2\,b\,c\,d^2\,n^2-7\,a^2\,b\,c\,d^2\,n-6\,a^2\,b\,c\,d^2-a\,b^2\,c^2\,d\,n^2-a\,b^2\,c^2\,d\,n+6\,a\,b^2\,c^2\,d+b^3\,c^3\,n^2+5\,b^3\,c^3\,n+6\,b^3\,c^3\right )}{{\left (a\,d-b\,c\right )}^3\,{\left (c+d\,x\right )}^{n+4}\,\left (n^3+6\,n^2+11\,n+6\right )}-\frac {a\,c\,{\left (a+b\,x\right )}^n\,\left (a^2\,d^2\,n^2+3\,a^2\,d^2\,n+2\,a^2\,d^2-2\,a\,b\,c\,d\,n^2-8\,a\,b\,c\,d\,n-6\,a\,b\,c\,d+b^2\,c^2\,n^2+5\,b^2\,c^2\,n+6\,b^2\,c^2\right )}{{\left (a\,d-b\,c\right )}^3\,{\left (c+d\,x\right )}^{n+4}\,\left (n^3+6\,n^2+11\,n+6\right )}-\frac {2\,b^3\,d^3\,x^4\,{\left (a+b\,x\right )}^n}{{\left (a\,d-b\,c\right )}^3\,{\left (c+d\,x\right )}^{n+4}\,\left (n^3+6\,n^2+11\,n+6\right )}-\frac {b\,d\,x^2\,{\left (a+b\,x\right )}^n\,\left (a^2\,d^2\,n^2+a^2\,d^2\,n-2\,a\,b\,c\,d\,n^2-8\,a\,b\,c\,d\,n+b^2\,c^2\,n^2+7\,b^2\,c^2\,n+12\,b^2\,c^2\right )}{{\left (a\,d-b\,c\right )}^3\,{\left (c+d\,x\right )}^{n+4}\,\left (n^3+6\,n^2+11\,n+6\right )}-\frac {2\,b^2\,d^2\,x^3\,{\left (a+b\,x\right )}^n\,\left (4\,b\,c-a\,d\,n+b\,c\,n\right )}{{\left (a\,d-b\,c\right )}^3\,{\left (c+d\,x\right )}^{n+4}\,\left (n^3+6\,n^2+11\,n+6\right )} \]
- (x*(a + b*x)^n*(2*a^3*d^3 + 6*b^3*c^3 + 3*a^3*d^3*n + 5*b^3*c^3*n + a^3* d^3*n^2 + b^3*c^3*n^2 + 6*a*b^2*c^2*d - 6*a^2*b*c*d^2 - a*b^2*c^2*d*n - 7* a^2*b*c*d^2*n - a*b^2*c^2*d*n^2 - a^2*b*c*d^2*n^2))/((a*d - b*c)^3*(c + d* x)^(n + 4)*(11*n + 6*n^2 + n^3 + 6)) - (a*c*(a + b*x)^n*(2*a^2*d^2 + 6*b^2 *c^2 + 3*a^2*d^2*n + 5*b^2*c^2*n + a^2*d^2*n^2 + b^2*c^2*n^2 - 6*a*b*c*d - 8*a*b*c*d*n - 2*a*b*c*d*n^2))/((a*d - b*c)^3*(c + d*x)^(n + 4)*(11*n + 6* n^2 + n^3 + 6)) - (2*b^3*d^3*x^4*(a + b*x)^n)/((a*d - b*c)^3*(c + d*x)^(n + 4)*(11*n + 6*n^2 + n^3 + 6)) - (b*d*x^2*(a + b*x)^n*(12*b^2*c^2 + a^2*d^ 2*n + 7*b^2*c^2*n + a^2*d^2*n^2 + b^2*c^2*n^2 - 8*a*b*c*d*n - 2*a*b*c*d*n^ 2))/((a*d - b*c)^3*(c + d*x)^(n + 4)*(11*n + 6*n^2 + n^3 + 6)) - (2*b^2*d^ 2*x^3*(a + b*x)^n*(4*b*c - a*d*n + b*c*n))/((a*d - b*c)^3*(c + d*x)^(n + 4 )*(11*n + 6*n^2 + n^3 + 6))
\[ \int (a+b x)^n (c+d x)^{-4-n} \, dx=\int \frac {\left (b x +a \right )^{n}}{\left (d x +c \right )^{n} c^{4}+4 \left (d x +c \right )^{n} c^{3} d x +6 \left (d x +c \right )^{n} c^{2} d^{2} x^{2}+4 \left (d x +c \right )^{n} c \,d^{3} x^{3}+\left (d x +c \right )^{n} d^{4} x^{4}}d x \]
int((a + b*x)**n/((c + d*x)**n*(c**4 + 4*c**3*d*x + 6*c**2*d**2*x**2 + 4*c *d**3*x**3 + d**4*x**4)),x)